import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
import HomeView from "@/view/HomeView.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.VITE_BASE_URL),
    // history: createWebHashHistory(),
    routes: [
        {
            path: "/",
            name: "HomeView",
            component: HomeView
        },
        {
            path: "/moviedetail",
            name: "MovieDetail",
            component: () => import("../components/MovieDetail.vue")
        },
        {
            path: "/essaydetail",
            name: "EssayDetail",
            component: () => import("../components/EssayDetail.vue")
        },
        {
            path: "/toplistdetail",
            name: "TopListDetail",
            component: () => import("../components/TopListDetail.vue")
        },
        {
            path: "/ancientpoetrydetail",
            name: "AncientPoetryDetail",
            component: () => import("../components/AncientPoetryDetail.vue")
        },
        {
            path: "/newsdetail",
            name: "NewsDetail",
            component: () => import("../components/NewsDetail.vue")
        }
    ]
});

export default router;
